package o;

import android.content.Context;
import o.dky.c;

public class eah {
    private static eah ॱ;
    private int ˊ;
    private int ˋ;
    private int ˎ;

    private eah() {
    }

    public static synchronized eah ˋ() {
        eah o_eah;
        synchronized (eah.class) {
            if (ॱ == null) {
                ॱ = new eah();
            }
            o_eah = ॱ;
        }
        return o_eah;
    }

    public void ˎ(Context context) {
        this.ˋ = 0;
        this.ˊ = 0;
        this.ˎ = 0;
        if (epr.ˎ().ॱॱ()) {
            ˏ(context);
        } else if (azb.ˎ(context)) {
            ॱ(context);
        } else {
            ˋ(context);
        }
    }

    public int ॱ(Context context) {
        if (this.ˋ <= 0 && azb.ˎ(context)) {
            int ॱ = azb.ॱ(context);
            int ˊ = ˊ();
            int ˏ = ˏ();
            this.ˋ = ॱ - (((ˊ + ˋ(ॱ, ˊ, ˏ)) + ˏ) * 2);
        }
        return this.ˋ;
    }

    public int ˋ(Context context) {
        if (this.ˊ <= 0 && !azb.ˎ(context)) {
            this.ˊ = epv.ˎ(context);
            this.ˊ -= ˊ() * 2;
        }
        return this.ˊ;
    }

    public int ˏ(Context context) {
        if (this.ˎ <= 0) {
            if (azb.ˎ(context)) {
                this.ˎ = epv.ˏ(context);
            } else {
                this.ˎ = epv.ˎ(context);
            }
            this.ˎ -= ˊ() * 2;
        }
        return this.ˎ;
    }

    private int ˋ(int i, int i2, int i3) {
        return ((i - (i2 * 2)) - (i3 * 7)) / 8;
    }

    private int ˊ() {
        return ContentManager.getInstant().getContext().getResources().getDimensionPixelSize(c.ॱᐝ);
    }

    private int ˏ() {
        return ContentManager.getInstant().getContext().getResources().getDimensionPixelSize(c.ʻ);
    }
}
